<{include file="common/header.tpl"}>
<style>
.fcontent { padding: 1em 2em; }
.fcontent .pagination { padding: 1em 10px; }
.hidden { display: none; }
.detailbox { background-color: #eee; line-height: 2em;  padding: 1em; }
.detailbox ul { list-style: none; padding: 5px 0 5px 1em; }
.detailbox ul ul { padding: 5px 0 0 3em; }
.detailbox ul ul ul{ padding: 5px 0 0 1em; }
.detailbox ul li label {color: gray; display: inline-block; text-align: right; width: 80px; }
.detailbox ul ul label {color: #966; }
.detailbox ul ul ul label { color: #696; }
.detailbox ul.form { padding-left: 0; }
.detailbox ul pre { display: block; background-color: #fff; width: 90%; margin: 10px 1em; padding: 1em; color: #666; max-width: 800px; overflow: scroll; }

.sdk .btns, .list .btns, .detailbox .btns, .formbox .btns  { padding: 1em 0; }
.sdk .btns a, .list .btns a, .detailbox .btns a, .formbox .btns a { padding: 6px 20px; background-color: #01d093; border: 1px solid green; color: #eee; }

.formbox ul { list-style: none; }
.formbox ul .line { padding: 5px 0 ; } 
.formbox ul .line label { display: inline-block; width: 80px;font-weight:bold; text-align: left; padding-right: 1em;margin-bottom:10px;color:#1dd697; }
.formbox ul .line label:after{content:':';}
.formbox ul textarea { width: 600px; height: 100px; }
.formbox ul input[type=text] { width: 600px; }
.formbox ul input.date { color: green;  width: 100px; }
.actions { padding-left: 65px; }

.tips { padding-left: 60px; }
.tips ol li { line-height: 2em; }


table.gridtable {
    width: 90%;
    font-family: verdana,arial,sans-serif;
    font-size:12px;
    color:#333333;
    border-width: 1px;
    border-color: #666666;
    border-collapse: collapse;
}
table.gridtable th {
    border-width: 1px;
    padding: 8px;
    border-style: solid;
    border-color: #666666;
    background-color: #dedede;
}
table.gridtable td {
    border-width: 1px;
    padding: 8px;
    border-style: solid;
    border-color: #666666;
    background-color: #ffffff;
}

table.gridtable .admTrWarn td { font-style: italic; background-color: #ffe; }

table.gridtable tr.maincat td { background-color: #EEE; font-style: italic; color: #999; }

.imgbox{display:inline-block;}
.imgbox_snapshotUrls { display: block; margin: 2em 1em; }
.imgbox_snapshotUrls .imgbox { display: inline-block; width: 200px; }
.detailbox .imgbox_snapshotUrls .imgbox { display: inline-block; width: 180px; }
.imgbox_snapshotUrls .imgbox .upimg { width: 160px; }
.imgbox_snapshotUrls .imgbox p { cursor-type: pointer; text-align: center; }
.imgbox img { max-width: 300px; max-height:250px}

.imgbox_iconUrl, .imgbox_apkUrl { display: block; position: relative; left: 60px; padding: 1em 10px 2em 10px;  }
.detailbox .imgbox_apkUrl { padding: 5px; }

table.gridtable td.thumb img { height: 36px; width: auto; }
table.gridtable tr.major td { background-color: #fee; color: #444; }
table.gridtable td .smalltxt { }
table.gridtable td .smalltxt .url { background-color: #eee; color: #99f; font-size: 10px; font-style: italic; }

</style>
<script src="<{$smarty.const._CDN_}>/resource/laydate/laydate.js" type="text/javascript"></script>
<script src="<{$smarty.const._CDN_}>/resource/layer/layer.js" type="text/javascript"></script>
<script>
function form_submit_it (formItem)
{
    inputs = $(formItem).find('input');
    for (i = 0; i < inputs.length; ++i)
    {
        item = inputs[i];
        if ($(item).attr('type') == 'text')
        {
            var regx = $(item).attr('regex');
            if (regx && regx != 'undefined')
            {
                var patt = new RegExp(regx);
                if (! patt.test($(item).val()))
                {
                    try {
                    layer.tips('请检查输入', item, {
                        tips: [3, '#78BA32']
                        });
                    }
                    catch (c)
                    {
                        alert(c);
                    }
                    return false;
                }
            }
        }

    } // for
    
    inputs = $(formItem).find('textarea');
    for (i = 0; i < inputs.length; ++i)
    {
        item = inputs[i];

        var regx = $(item).attr('regex');
        if (regx && regx != 'undefined')
        {
            var patt = new RegExp(regx);
            if (! patt.test($(item).val()))
            {
                try {
                layer.tips('请检查输入', item, {
                    tips: [3, '#78BA32']
                    });
                }
                catch (c)
                {
                    alert(c);
                }
                return false;
            }
        }

    } // for
    
    selects = $(formItem).find('select ');
    for (i = 0; i < selects.length; ++i)
    {
        item = selects[i];
        var regx = $(item).attr('regex');
        if (regx && regx != 'undefined')
        {
            var patt = new RegExp(regx);
            
            if (! patt.test($(item).val()) || $(item).val()==0)
            {
                try {
                layer.tips('请检查选择的值', item, {
                    tips: [3, '#78BA32']
                    });
                }
                catch (c)
                {
                    alert(c);
                }
                return false;
            }
        }

    }
    
    return true;
}
</script>

<div class="fcontent">
    <{if $form_include_head_file}>
        <{include file="$form_include_head_file"}>
    <{/if}>

    <{$form_content}>

    <{if $pagination}>
       <{$pagination}>
    <{/if}>

    <{if $form_include_edit_file}>
        <{include file="$form_include_edit_file"}>
    <{/if}>

    <{if $form_include_foot_file}>
        <{include file="$form_include_foot_file"}>
    <{/if}>
</div>
<{include file="common/footer.tpl"}>
